#include "InputKeyBoard.h"


InputKeyBoard::InputKeyBoard()
{
}

void InputKeyBoard::Init(HWND hWnd)
{
	m_CurrentKey.InitInput();
	m_CurrentKey.InitKeyBoard(hWnd);
}

bool InputKeyBoard::IsKeyDown(int key)
{
	return m_CurrentKey.IsKeyDown(key);
}

bool InputKeyBoard::IsPressed(int key)
{
	return m_CurrentKey.IsPressed(key);
}

void InputKeyBoard::GetState()
{
	m_LastKey = m_CurrentKey;
	m_CurrentKey.GetState();
}

void InputKeyBoard::ClearInput()
{
	m_CurrentKey.ClearKeyCode();
	m_LastKey.ClearKeyCode();
}

bool InputKeyBoard::IsKeyStateOfTwoKeyCode(int key1, int key2)
{
	if ((m_CurrentKey.GetKeyCode() == key1 && m_LastKey.GetKeyCode() == key2)
		|| m_CurrentKey.GetKeyCode() == key2 && m_LastKey.GetKeyCode() == key1) return true;

	return false;
}

InputKeyBoard::~InputKeyBoard()
{
}
